package com.demo.service.impl;

import com.demo.entity.PartnerType;
import com.demo.mapper.PartnerTypeMapper;
import com.demo.service.PartnerTypeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PartnerTypeServiceImpl implements PartnerTypeService {
    @Autowired
    private PartnerTypeMapper partnerTypeMapper;
    @Override
    public int Insert(PartnerType partnerType) {
        return partnerTypeMapper.Insert(partnerType);
    }

    @Override
    public int Delete(String PartnerType) {
        return partnerTypeMapper.Delete(PartnerType);
    }

    @Override
    public PageInfo<PartnerType> list(int pageIndex, int pageSize) {
        PageHelper.startPage(pageIndex,pageSize);
        return new PageInfo<>(partnerTypeMapper.list());
    }
}
